package cn.mln521.annotation.demo2;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component("bean1")
public class Bean1 {

    @PostConstruct
    public void setup(){
        System.out.println("setup..");
    }

    public void say(){
        System.out.println("say...");
    }

    @PreDestroy
    public void teardown(){
        System.out.println("teardown...");
    }
}
